//
//  MLAFoodHomeVC.m
//  MagicLampApp
//
//  Created by Zheng on 2018/12/30.
//  Copyright © 2018 zheng.magic.lamp.app. All rights reserved.
//

#import "MLAFoodHomeVC.h"
#import "MLAOrderFoodHomeVC.h"
#import "MLAEateryHomeVC.h"

@interface MLAFoodHomeVC ()

@end

@implementation MLAFoodHomeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.titlesArr = @[@"就餐方",@"供餐方"];
    
    MLAOrderFoodHomeVC *orderFoodVC = [[MLAOrderFoodHomeVC alloc] init];
    
    //TODO:设置是否开通的状态
    MLAEateryHomeVC *eateryVC = [[MLAEateryHomeVC alloc] init];
    eateryVC.openType = @"1";
    
    self.viewsArr = @[orderFoodVC, eateryVC];
    [self reloadData];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    [self.navigationController setNavigationBarHidden:YES animated:NO];
    
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    
    [self.navigationController setNavigationBarHidden:NO animated:YES];
}

- (void)viewWillLayoutSubviews {
    [super viewWillLayoutSubviews];
    self.tabBar.frame = CGRectMake(10, 25, CGRectGetWidth(self.view.frame)-10, 36);
    self.pagerController.view.frame = CGRectMake(0, CGRectGetMaxY(self.tabBar.frame), CGRectGetWidth(self.view.frame), CGRectGetHeight(self.view.frame)- CGRectGetMaxY(self.tabBar.frame));
}

#pragma mark - LoadData
- (void)loadData {
    
}


@end
